/*
 * Monster.h
 *
 *  Created on: Oct 13, 2011
 *	Created by: Devin Manno
 *  Updated by: Devin Manno
 *	Last Update: Oct 27, 2011
 */

#ifndef MONSTER_H_
#define MONSTER_H_

#include "Character.h"
#include "MonsterStats.h"
#include "EquipmentType.h"
#include <string>
#include <ctime>
#include <cstdlib>

class Monster: public Character {

    friend ostream& operator<<(ostream& out, Monster& m)
    {
        m.saveCharacter(out);
        out << m.monsterStats << endl;
        return out;
    }
    friend istream& operator>>(istream& in, Monster& m)
    {
        m.loadCharacter(in);
        in >> m.monsterStats;
        return in;
    }
private:
	MonsterStats monsterStats;
	void generateStats(int playerLevel); 					// generate stats randomly for new monsters

public:
    Monster():Character("Monster"){}
    // generate a monster based on the player's level. Called by controller class which will generate a random monster type and name

    // call Character constructor for generic monster, then set random stats, name and type in generateStats function
	Monster(int playerLevel) : Character("Generic Monster", WARRIOR, "Monster") {
		generateStats(playerLevel);
	}
	virtual ~Monster();
	MonsterStats& getMonsterStats();

	// virtual function implementation
	std::string getClassName() const;
};

#endif /* MONSTER_H_ */
